﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_AccountGetTrashID]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_AccountGetTrashID];
GO
-------------------------------------------------------------------------------
-- sproc_AccountGetTrashID
-------------------------------------------------------------------------------
CREATE PROCEDURE [dbo].[sproc_AccountGetTrashID]
(
    @userID             int ,
    @TrashID          int OUTPUT
)
AS
BEGIN
SET NOCOUNT ON;

SELECT @TrashID = FolderID FROM dbo.TabUsrMailFolder WHERE userid = @userID and FolderName = N'垃圾箱' and Attribute = 0;

END
GO